package com.zd.service.postimgs.impl;

import com.zd.domain.Post;
import com.zd.domain.PostImgs;
import com.zd.mapper.CommentMapper;
import com.zd.mapper.PostImgsMapper;
import com.zd.mapper.PostLikeMapper;
import com.zd.mapper.PostMapper;
import com.zd.service.postimgs.PostImgsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class PostImgsServiceImpl implements PostImgsService {

    @Autowired
    private PostMapper postMapper;

    @Autowired
    private PostImgsMapper postImgsMapper;

    @Autowired
    private PostLikeMapper postLikeMapper;

    @Autowired
    private CommentMapper commentMapper;


    /**
     * 添加帖子图片
     * @param postImgs
     * @return
     */
    @Override
    public int savePostImg(PostImgs postImgs) {
        return postImgsMapper.savePostImg(postImgs);
    }
}
